home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / MW MPW Binaries 1.1.1a2 / mwcPPC / MWCExamples / Count ƒ / Count.r < prev    next >
Encoding:
Text File  |  1994-04-06  |  1.6 KB  |  79 lines  |  [TEXT/MPS ]

  1. /*
  2.     Count.r - commando resource file
  3.     Copyright Apple Computer, Inc. 1985-1987
  4.     All rights reserved.
  5.  
  6.     Count [-l] [-c] [file…]  < file > counts
  7.          -l                      # write only line counts
  8.          -c                      # write only character counts
  9. */
  10.  
  11. #include    "Cmdo.r"
  12.  
  13.  
  14. resource 'cmdo' (128) {
  15.     {
  16.         245,            /* Height of dialog */
  17.         "Counts the lines and characters in its input, and writes the results to standard output.",
  18.         {
  19.             notDependent {}, RadioButtons {
  20.                 {
  21.                     {25, 250, 40, 410},
  22.                     "Lines and characters",
  23.                     "",
  24.                     Set,
  25.                     "Count the number of lines and characters in the input file(s) (or standard input).",
  26.                                     
  27.                     {40, 250, 55, 340},
  28.                     "Lines",
  29.                     "-l",
  30.                     NotSet,
  31.                     "Only count the number of lines in the input file(s) (or standard input).",
  32.  
  33.                     {55, 250, 70, 340},
  34.                     "Characters",
  35.                     "-c",
  36.                     NotSet,
  37.                     "Only count the number of characters in the input file(s) (or standard input).",
  38.                 }
  39.             },
  40.             notDependent {}, TextBox {
  41.                 gray,
  42.                 {17, 240, 75, 450},
  43.                 "Count"
  44.             },
  45.             Or {{-4}}, MultiFiles {
  46.                 "Files to count…",
  47.                 "Select the files to count.  If no files are specified Count reads "
  48.                         "from standard input.",
  49.                 {36, 35, 56, 200},
  50.                 "Files to count:",
  51.                 "",
  52.                 MultiInputFiles {
  53.                     {TEXT},
  54.                     FilterTypes,
  55.                     "Only text files",
  56.                     "All files",
  57.                 }
  58.             },
  59.             Or {{-3}}, Redirection {
  60.                 StandardInput,
  61.                 {85, 30}
  62.             },
  63.             notDependent {}, Redirection {
  64.                 StandardOutput,
  65.                 {85, 180}
  66.             },
  67.             notDependent {}, Redirection {
  68.                 DiagnosticOutput,
  69.                 {85, 330}
  70.             },
  71.             notDependent {}, TextBox {
  72.                 gray,
  73.                 {80, 25, 125, 450},
  74.                 "Redirection"
  75.             },
  76.         }
  77.     }
  78. };
  79.